
from database.database import Database

class AccessLogTable(Database):

    def __init__(self):
        self.table_name = 'accesslog'

    def insert(self, user, ip):
        info = {'user':user,'ip':ip}
        sql = self.get_insert_sql_from_obj(info, self.table_name)
        self.execute(sql)
        return int(self.cursor.lastrowid)
